package com.tjmc.company.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tjmc.company.api.entity.JobInfoEntity;
import com.tjmc.company.api.vo.JobTopVO;
import com.tjmc.recruit.admin.api.entity.PlatformUserInfoEntity;
import com.tjmc.recruit.common.core.util.R;
import com.tjmc.recruit.common.core.util.RetOps;

public interface JobInfoService extends IService<JobInfoEntity> {
    /**
     * 职位置顶
     * @param jobTopVO 置顶信息
     * @return
     */
    R top(JobTopVO jobTopVO);

    /**
     * 查询个人推荐职位
     * @param page 分页参数
     * @return
     */
    Page<JobInfoEntity> getRecommendJobPage(Page page, String jobIntent);

    /**
     * 查询职位列表-依次按推广、置顶、修改时间排序
     * @param page 分页条件
     * @return
     */
    Page<JobInfoEntity> getJobPage(Page page);

    /**
     * 查询置顶职位列表
     * @param page
     * @param companyId
     * @return
     */
    Page<JobInfoEntity> selectTopJobPage(Page page, Long companyId);

    R saveJobInfo(JobInfoEntity jobInfo);

    R updateJobInfo(JobInfoEntity jobInfo);

    R refreshJob(Long jobId, String refreshType);

    R jobDetail(String jobId);

    R updateRefreshDuration(Integer refreshDuration, String jobId);

    Integer getPublishNumByMember(PlatformUserInfoEntity platformUserInfo);

    R<Long> getRemainNum();

    Page<JobInfoEntity> selectCompanyJobPage(Page page, LambdaQueryWrapper<JobInfoEntity> wrapper);
}
